<%= form_for([@cage, @entrance, @door]) do |f| %>
  <% if @door.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@door.errors.count, "error") %> prohibited this door from being saved:</h2>

      <ul>
      <% @door.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :open %><br />
    <%= f.check_box :open %>
  </div>
  <div class="field">
    <%= f.label :entrance_id %><br />
    <%= f.number_field :entrance_id %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
